function liebiao(){
	//1.获取元素
	var liebiao = document.querySelector(".liebiao");
	var register = document.querySelector(".register");
	var isBlock = false;
	//2.添加事件（点击，鼠标）
	liebiao.addEventListener("touchend",function(){
	//3.控制样式
	if(!isBlock){
		register.style.transform="translateX(0)"
	//		register.style.display="block"
		isBlock=true;
	}else{
		register.style.transform="translateX(-100%)"
	//		register.style.display="none"
			isBlock=false;
		}
	})
}
liebiao();

//注册页关闭按钮
function close(){
	var close = document.querySelector(".close");
	var register = document.querySelector(".register");
	var isBlock = false;
	close.addEventListener("touchend",function(){
		if(!isBlock){
			register.style.transform="translateX(-100%)"
			isBlock=true;
		}else{
			register.style.transform="translateX(0)"
			isBlock=false;
		}
	})
}
close();
//登录页按钮
function login(){
	var login = document.querySelector(".login");
	var login_center_box = document.querySelector(".login-center-box");
	var isBlock = false;
	login.addEventListener("touchend",function(){
		if(!isBlock){
			login_center_box.style.transform="translateX(-100%)"
			isBlock=true
		}else{
			login_center_box.style.transform="translateX(0)"
			isBlock=false;
		}
	})
}
login();

//登录页返回
function back(){
	var back = document.querySelector(".back");
	var login_center_box = document.querySelector(".login-center-box");
	var isBlock = false;
	back.addEventListener("touchend",function(){
		if(!isBlock){
			login_center_box.style.transform="translateX(0)"
			isBlock=true;
		}else{
			login_center_box.style.transform="translateX(-100%)"
			isBlock=false;
		}
	})
}
back();
//展示下拉菜单
function down(){
	var i = document.querySelectorAll(".icon-iconfonti");
	var drop_down = document.querySelectorAll(".drop-down2");
	var isblock = false;
	for( let a=0;a<i.length;a++){
			i[a].addEventListener("touchend",function(){
			if(!isblock){
				i[a].classList.add("down_i")
			    drop_down[a].classList.add("down_li");
			    isblock = true;
			}else{
				i[a].classList.remove("down_i")
				drop_down[a].classList.remove("down_li")
				isblock = false;
			}
			
		})
	}
	
	
}
down();
//个人中心
function personal(){
	var login1 = document.querySelector(".login1");
	var personal = document.querySelector(".personal");
	var isBlock = false;
	login1.addEventListener("touchend",function(){
		if(!isBlock){
			personal.style.transform="translateX(-100%)"
			isBlock=true;
		}else{
			personal.style.transform="translateX(0)"
			isBlock=false;
		}
	})
}
personal();
//个人中心退出
function exit(){
	var exit = document.querySelector(".exit");
	var personal = document.querySelector(".personal");
	var isBlock = false;
	exit.addEventListener("touchend",function(){
		if(!isBlock){
			personal.style.transform="translateX(0)"
			isBlock=true;
		}else{
			personal.style.transform="translateX(-100%)"
			isBlock=false;
		}
	})
}
exit();

//个人中心关闭
//function close2(){
//	var close2 = document.querySelector(".close");
//	var personal = document.querySelector(".personal");
//	var login_center_box = document.querySelector(".login-center-box");
//	var register = document.querySelector(".register");
//	var isBlock = false;
//	close2.addEventListener("touchend",function(){
//		
//	})
//	
//}
//热搜
function topseach(){
	var seach = document.querySelector(".header-bottom");
	var topseach = document.querySelector(".close2");
	var topseachbox = document.querySelector(".topseach-box");
	seach.addEventListener("touchend",function(){
		topseachbox.classList.add("topseach_on");
	});
	topseach.addEventListener("touchend",function(){
		topseachbox.classList.remove("topseach_on")
	})
};
topseach();
//gimc
function gimc(){
	var seach = document.querySelector(".search-text");
	var gimc = document.querySelector(".close3");
	var gimcbox = document.querySelector(".gimc-box");
	seach.addEventListener("touchend",function(){
		gimcbox.classList.add("gimc_on");
	});
	gimc.addEventListener("touchend",function(){
		gimcbox.classList.remove("gimc_on")
	})
};
gimc();
